// 1.引入模块
const mongoose = require('mongoose');
// 2.链接数据库
let DB = mongoose.connect('mongodb://localhost/bmsdb');

DB.then(() => {
    console.log('链接数据库成功');
}, () => {
    console.log('链接数据库失败');
});